﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sale.DTO.ImportExport
{
    public class ImportDTO
    {
        public Guid Id { get; set; }
        public DateTime ImportDate { get; set; }
        public Merchandise.MerchandiseDTO Merchandise { get; set; }
        public double Quantity { get; set; }
        public decimal OriginPrice { get; set; }
        public CurrencyDTO Currency { get; set; }
        public decimal ExchangeRate { get; set; }
        public double Tax { get; set; }
        public decimal ShippingFee { get; set; }
        public decimal TotalItemValue
        {
            get {
                return UnitPriceAfterTax * (decimal)Quantity * ExchangeRate;
            }
        }
        public string Notes { get; set; }
        public decimal UnitPriceAfterTax
        {
            get
            {
                return (OriginPrice + ((decimal)(Tax / 100.0) * OriginPrice) + ShippingFee);
            }

        }
        public string CreatedBy { get; set; }

        public ImportDTO()
        {
            //IsVirtual = false;
        }
    }
}
